//
//  LOLEquipCell.m
//  LOLXXbox
//
//  Created by dllo on 16/1/28.
//  Copyright © 2016年 Grasstrio. All rights reserved.
//

#import "LOLEquipCell.h"
#import <Masonry.h>
#import <UIImageView+WebCache.h>
@implementation LOLEquipCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.nameLabel = [[UILabel alloc] init];
        [self.contentView addSubview:self.nameLabel];

        
        self.nextImageView = [[UIImageView alloc] init];
        [self.contentView addSubview:self.nextImageView];

    }
    return self;
}

- (void)layoutSubviews{
    [super layoutSubviews];
    [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.top.equalTo(self.contentView).offset(10);
        make.left.equalTo(self.contentView).offset(15);
        make.bottom.equalTo(self.contentView).offset(-10);
        make.width.equalTo(@150);
    }];
    
    [self.nextImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.top.equalTo(self.contentView).offset(10);
        make.right.equalTo(self.contentView).offset(-15);
        make.bottom.equalTo(self.contentView).offset(-10);
        make.width.equalTo(@30);
    }];
    
}


- (void)setEquipModel:(LOLEquipAAAModel *)equipModel{
    _equipModel = equipModel;
    self.nameLabel.text = _equipModel.text;
    self.nextImageView.image = [UIImage imageNamed:@"Next"];
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
